window.onload = function(){
	
	var area = document.getElementById("area");
	var l = document.getElementById("l");
	var btn1 = document.getElementsByTagName("button")[0];
	var btn2 = document.getElementsByTagName("button")[1];
	btn1.onclick = fun1;
	btn2.onclick = fun2;
	var r = parseFloat(document.getElementById("r").value);
	function fun1(){
		
		var s = 3.14*r*r;
		area.value = s;
	}
	function fun2(){
		// var r = parseFloat(document.getElementById("r").value);
		var chang = 3.14*r*2;
		l.value = chang;
	}
}